package com.movie.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.movie.admin.entity.Movie;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface MovieMapper extends BaseMapper<Movie> {
    @Select("SELECT * FROM movies WHERE average_rating IS NOT NULL ORDER BY average_rating DESC LIMIT 10")
    List<Movie> findTop10ByOrderByAverageRatingDesc();
} 